<?php

namespace app\common\lib;

/**
 * Class Broker
 * @package app\common\lib
 */
class Broker extends \Jasny\SSO\Broker
{
    /**
     * Broker constructor.
     * @param $url
     * @param $broker
     * @param $secret
     * @param int $cookie_lifetime
     */
    public function __construct($url, $broker, $secret, $cookie_lifetime = 3600)
    {
        parent::__construct($url, $broker, $secret, $cookie_lifetime);
    }

    /**
     * 获取access_token
     *
     * @return string
     */
    public function getAccessToken()
    {
        return $this->getSessionId();
    }
}